<@override name="page-title">
动态修改
</@override>
<@override name="page-style">
<link rel="stylesheet" href="/assets/admin/css/plugins/file-upload/bootstrap-fileupload.css">
</@override>
<@override name="page-body">

<div class="ibox-content">
    <form class="form-horizontal m-t" id="updateForm" enctype="multipart/form-data">
        <input type="hidden" name="pd_id" value="${projectDynamic.pd_id}">
        
        <div class="form-group">
            <label class="col-xs-3 control-label">项目动态链接：</label>
            <div class="col-xs-8">
                <input type="text" class="form-control" value="${projectDynamic.pd_url}" id="pd_url" name="pd_url"
                       placeholder="请输入项目动态链接"
                       minlength="2" required="" aria-required="true">
            </div>
        </div>
        
        <div class="form-group">
            <label class="col-xs-3 control-label">项目动态名称：</label>
            <div class="col-xs-8">
                <input type="text" class="form-control" value="${projectDynamic.title}" id="title" name="title"
                       placeholder="请输入项目动态名称"
                       minlength="2" required="" aria-required="true">
            </div>
 		</div>
        <div class="form-group">
            <label class="col-xs-3 control-label">项目简介：</label>
            <div class="col-xs-8">
                <textarea  class="form-control" id="summary" name="summary" rows="3"
                          placeholder="请输入简介">${projectDynamic.summary}</textarea>
            </div>
        </div>

        <div class="form-group">
            <label class="col-xs-3 control-label">动态作者：</label>
            <div class="col-xs-8">
                <input type="text" class="form-control" value="${projectDynamic.author}" id="author" name="author"
                       placeholder="请输入项目负责人"
                       minlength="2" required="" aria-required="true">
            </div>
        </div>
        
      <div class="form-group">
            <label class="col-xs-3 control-label">动态来源：</label>
            <div class="col-xs-8">
                <input type="text" class="form-control" value="${projectDynamic.source}" id="source" name="source"
                       placeholder="请输入项目动态来源"
                       minlength="2" required="" aria-required="true">
            </div>
        </div>

        <div class="form-group">
            <label class="col-xs-3 control-label">项目图片：</label>
            <div class="col-xs-8">
                <div class="fileupload fileupload-new" data-provides="fileupload">
                    <div class="btn-group">
                        <label title="上传图片" for="fileupload" class="btn btn-primary">
                            <input type="file" accept="image/*" name="DynamicPic" id="fileupload" class="hide">上传图片
                        </label>
                    </div>
                    <div class="fileupload-new thumbnail" style="width: 200px; height: 150px;">
                       
                        <#if projectDynamic.picture != ''>
                            <img src="${domain}${projectDynamic.picture}" alt=""/>
                        <#else>
                            <img src="/assets/admin/img/noimage.jpg" alt="">
                        </#if>
                    </div>
                    <div class="fileupload-preview fileupload-exists thumbnail" id="imgDiv"
                         style="max-width: 200px; max-height: 150px; line-height: 20px;">
                    </div>
                 </div>
            </div>
        </div>
        
        <div class="form-group">
        	<label class="col-xs-3 control-label">文件上传：</label>
        	<div class="col-xs-8">
        		<input type="file" name="DynamicUpdateFil111">
        		<#if projectDynamic.fiFile != ''>
                    文件下载：<a href="${projectDynamic.fiFile}">${projectDynamic.fiFile}</a>
                <#else>
                    
                </#if>
        		
        	</div>
        </div>
        
        <div class="form-group">
        	<label class="col-xs-3 control-label">文件上传：</label>
        	<div class="col-xs-8">
        		<input type="file" name="DynamicUpdateFil211">
        		<#if projectDynamic.seFile != ''>
                   文件下载：<a href="${projectDynamic.seFile}">${projectDynamic.seFile}</a>
                <#else>
                    
                </#if>
        		
        	</div>
        </div>
        
        <div class="form-group">
        	<label class="col-xs-3 control-label">文件上传：</label>
        	<div class="col-xs-8">
        		<input type="file" name="DynamicUpdateFil311">
        		<#if projectDynamic.thFile != ''>
                   文件下载：<a href="${projectDynamic.thFile}">${projectDynamic.thFile}</a>
                <#else>
                    
                </#if>
        		
        	</div>
        </div>
      
        <div class="form-group">
            <label class="col-xs-3 control-label">是否通过审核：</label>
            <div class="col-xs-8">
                <div class="checkbox-inline i-checks">
                    <label>
                        <input type="radio" value="0" name="status" <#if projectDynamic.status == 0>checked</#if>>
                        未审核
                    </label>
                    <label>
                        <input type="radio" value="1" name="status" <#if projectDynamic.status == 1>checked</#if>>
                        审核通过
                    </label>
                    <label>
                        <input type="radio" value="2" name="status" <#if projectDynamic.status == 2>checked</#if>>
                        审核不通过
                    </label>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-xs-12 col-xs-offset-4">
                <button class="btn btn-primary" type="submit">修改</button>
                &nbsp;&nbsp;&nbsp;&nbsp;
                <button onClick="layer_close();" class="btn btn-default radius" type="button">
                    取消
                </button>
            </div>
        </div>
    </form>
</div>
</@override>
<@override name="page-script">
<script type="text/javascript" src="/assets/admin/js/plugins/validate/jquery.validate.min.js"></script>
<script type="text/javascript" src="/assets/admin/js/plugins/validate/messages_zh.min.js"></script>
<script src="/assets/admin/js/plugins/file-upload/bootstrap-fileupload.js"></script>
<script src="/assets/admin/js/plugins/jquery-form/jquery.form.js"></script>
<script type="text/javascript">
    $(function () {
  
        $("#updateForm").validate({
            submitHandler: function (form) {
                var index = parent.layer.getFrameIndex(window.name);
                $(form).ajaxSubmit({
                    url: "/admin/PDynamic/update.json",
                    type: "POST",
                    success: function (data) {
                        if (data.ret) {
                            parent.$("#layer-data").val('1');
                        } else {
                            parent.$("#layer-data").val(data.errmsg);
                        }
                        parent.layer.close(index);
                    }
                });
            }
        })
    })
    ;
</script>
</@override>
<@extends name="admin/common/common.ftl"/>